<script lang="ts">
  import { link, push, replace } from "svelte-spa-router";
  import svelteLogo from '@/assets/svelte.svg'
</script>


<div class="text-center h-full my-10">
  <h1 class="text-3xl">此页为首页</h1>
  <img src={svelteLogo} alt="" class="w-40 mx-auto my-3">
  <a href="#/column" class="mr-5">a标签跳转去栏目页</a>
  <a href="/site" use:link>use:link跳转去站点页</a>


  <p class="text-xl">编程式路由</p>
  <button class="bg-blue-500 text-white px-4 py-2 rounded-md mr-5" on:click={()=>push('/column')}>栏目(push)</button>
  <button class="bg-blue-500 text-white px-4 py-2 rounded-md" on:click={()=>replace('/site')}>站点(replace)</button>
</div>
